(An-Naml) 27 : 16
وَوَرِثَ سُلَيْمَانُ دَاوُودَ ۖ وَقَالَ يَا أَيُّهَا النَّاسُ عُلِّمْنَا مَنْطِقَ الطَّيْرِ وَأُوتِينَا مِنْ كُلِّ شَيْءٍ ۖ إِنَّ هَٰذَا لَهُوَ الْفَضْلُ الْمُبِينُ
And Suleiman inherited Dawood; he said: "Oh people, we have been taught the language of birds, and we have been given from all things, indeed this is manifest Bounty".
It is told in verse 34: 12: “And to Suleiman, the wind - its morning journey was that of a month, and its afternoon journey was that of a month- and We made flow for him a spring of copper, and among the Jinn were those who worked for him with the Permission of his Lord, and whoever is deviated among them from Our Command, We will make him taste the punishment of the Blaze”. Prophet Suleiman was blessed with understanding the language of birds, ants, etc. He was also blessed with Jinns and Satan Jinns for different tasks. See explanation 3: 101-103; 18: 84 and 24: 10.